<!-- 父栏目有子栏目点击父栏目不跳转 -->
{{if nav.length>0}}
<nav class="nav">
    <ul class="flex flex-wrap">
        {{each nav}}
        {{if $value.status == 0}}
        {{if $value.pinyin == 'home'}}
        <li class="nav-item"><a href="/" title="首页">首页</a></li>
        {{else}}
        <li class="nav-item">
            {{if $value.children && $value.children.length>0}}
            {{if $value.type==0}}
            <a title="{{$value.name}}">{{$value.name}}</a>
            {{else}}
            <a title="{{$value.name}}">{{$value.name}}
            </a>
            {{/if}}
            <ul class="sub-nav">
                {{each $value.children}}
                {{if $value.status == 0}}
                <li class="sub-nav-item">
                    {{if $value.type==0}}
                    <a href="{{$value.path}}/index.html" title="{{$value.name}}">{{$value.name}}
                    </a>
                    {{else}}
                    <a href="{{$value.path}}/page.html" title="{{$value.name}}">{{$value.name}}
                    </a>
                    {{/if}}
                </li>
                {{/if}}
                {{/each}}
            </ul>
            {{else}}
            {{if $value.type==0}}
            <a href="{{$value.path}}/index.html" title="{{$value.name}}">{{$value.name}}</a>
            {{else}}
            <a href="{{$value.path}}/page.html" title="{{$value.name}}">{{$value.name}}
            </a>
            {{/if}}
            {{/if}}
        </li>
        {{/if}}
        {{/if}}
        {{/each}}
    </ul>
</nav>
{{/if}}